
class FriendListBean {
  List<FriendListDataBean> data;
  Map<String,dynamic> toJson()=>jsonFromFriendListBean(this);
  FriendListBean(Map<String,dynamic> json){
    jsonToFriendListBean(this,json);
  }
}

class FriendListDataBean {
  int id;
  int phone;
  String nick;
  String logo;
  Map<String,dynamic> toJson()=>jsonFromFriendListDataBean(this);
  FriendListDataBean(Map<String,dynamic> json){
    jsonToFriendListDataBean(this,json);
  }
}


//////////////////////////////////////////////////////////////

//----------------------------解析方法-------------------------

/////////////////////////////////////////////////////////////



void jsonToFriendListBean(FriendListBean bean,Map<String,dynamic> json){
  if(json==null) return;
  bean.data=[];
  for(var item in json['data']??[]){
    bean.data.add(FriendListDataBean(item));
  }

}
void jsonToFriendListDataBean(FriendListDataBean bean,Map<String,dynamic> json){
  if(json==null) return;
  bean.id=int.parse(json['id']?.toString()??'0');
  bean.phone=int.parse(json['phone']?.toString()??'0');
  bean.nick=json['nick']?.toString()??'';
  bean.logo=json['logo']?.toString()??'';
}
Map<String,dynamic> jsonFromFriendListBean(FriendListBean bean)=>{
  'data':bean.data,
};
Map<String,dynamic> jsonFromFriendListDataBean(FriendListDataBean bean)=>{
  'id':bean.id,
  'phone':bean.phone,
  'nick':bean.nick,
  'logo':bean.logo,
};
